package com.wanmait.baohan.mapper;

import com.wanmait.baohan.pojo.Product;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProductMapper {
    List<Product> findAllBy(@Param("pro") Product product);
    Product findOneBy(Integer productId);
    int deleteByPrimaryKey(Integer id);

    int insert(@Param("product") Product record);

    int insertSelective(Product record);

    Product selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Product record);

    int updateByPrimaryKey(Product record);

    List<Product> findAllProductsForCustomer(Integer id);

    Product findOneProductsForCustomer(@Param("customerId") Integer customerId, @Param("productId") Integer productId);
}